namespace EyeOpen.Domain.Transactional
{
	using System;
	using System.Linq;

	public interface ITransactionalCollection
		: IDisposable
	{
		IQueryable<T> Query<T>() where T : class, IAggregateRoot;

		void Add<T>(T entity) where T : class, IAggregateRoot;

		void Delete<T>(T entity) where T : class, IAggregateRoot;

		void Update<T>(T entity) where T : class, IAggregateRoot;

		T GetByKey<T>(IComparable key) where T : class, IAggregateRoot;

		void Commit();
	}
}